//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension SSOAdmin {
    // MARK: Enums

    public enum InstanceAccessControlAttributeConfigurationStatus: String, CustomStringConvertible, Codable {
        case creationFailed = "CREATION_FAILED"
        case creationInProgress = "CREATION_IN_PROGRESS"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum PrincipalType: String, CustomStringConvertible, Codable {
        case group = "GROUP"
        case user = "USER"
        public var description: String { return self.rawValue }
    }

    public enum ProvisionTargetType: String, CustomStringConvertible, Codable {
        case allProvisionedAccounts = "ALL_PROVISIONED_ACCOUNTS"
        case awsAccount = "AWS_ACCOUNT"
        public var description: String { return self.rawValue }
    }

    public enum ProvisioningStatus: String, CustomStringConvertible, Codable {
        case latestPermissionSetNotProvisioned = "LATEST_PERMISSION_SET_NOT_PROVISIONED"
        case latestPermissionSetProvisioned = "LATEST_PERMISSION_SET_PROVISIONED"
        public var description: String { return self.rawValue }
    }

    public enum StatusValues: String, CustomStringConvertible, Codable {
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case succeeded = "SUCCEEDED"
        public var description: String { return self.rawValue }
    }

    public enum TargetType: String, CustomStringConvertible, Codable {
        case awsAccount = "AWS_ACCOUNT"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AccessControlAttribute: AWSEncodableShape & AWSDecodableShape {
        /// The name of the attribute associated with your identities in your identity source. This is used to map a specified attribute in your identity source with an attribute in AWS SSO.
        public let key: String
        /// The value used for mapping a specified attribute to an identity source.
        public let value: AccessControlAttributeValue

        public init(key: String, value: AccessControlAttributeValue) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "[\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@]+")
            try self.value.validate(name: "\(name).value")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct AccessControlAttributeValue: AWSEncodableShape & AWSDecodableShape {
        /// The identity source to use when mapping a specified attribute to AWS SSO.
        public let source: [String]

        public init(source: [String]) {
            self.source = source
        }

        public func validate(name: String) throws {
            try self.source.forEach {
                try validate($0, name: "source[]", parent: name, max: 256)
                try validate($0, name: "source[]", parent: name, min: 0)
                try validate($0, name: "source[]", parent: name, pattern: "[\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@\\[\\]\\{\\}\\$\\\\\"]*")
            }
            try self.validate(self.source, name: "source", parent: name, max: 1)
            try self.validate(self.source, name: "source", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case source = "Source"
        }
    }

    public struct AccountAssignment: AWSDecodableShape {
        /// The identifier of the AWS account.
        public let accountId: String?
        /// The ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let permissionSetArn: String?
        /// An identifier for an object in AWS SSO, such as a user or group. PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in AWS SSO, see the AWS SSO Identity Store API Reference.
        public let principalId: String?
        /// The entity type for which the assignment will be created.
        public let principalType: PrincipalType?

        public init(accountId: String? = nil, permissionSetArn: String? = nil, principalId: String? = nil, principalType: PrincipalType? = nil) {
            self.accountId = accountId
            self.permissionSetArn = permissionSetArn
            self.principalId = principalId
            self.principalType = principalType
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "AccountId"
            case permissionSetArn = "PermissionSetArn"
            case principalId = "PrincipalId"
            case principalType = "PrincipalType"
        }
    }

    public struct AccountAssignmentOperationStatus: AWSDecodableShape {
        /// The date that the permission set was created.
        public let createdDate: Date?
        /// The message that contains an error or exception in case of an operation failure.
        public let failureReason: String?
        /// The ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let permissionSetArn: String?
        /// An identifier for an object in AWS SSO, such as a user or group. PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in AWS SSO, see the AWS SSO Identity Store API Reference.
        public let principalId: String?
        /// The entity type for which the assignment will be created.
        public let principalType: PrincipalType?
        /// The identifier for tracking the request operation that is generated by the universally unique identifier (UUID) workflow.
        public let requestId: String?
        /// The status of the permission set provisioning process.
        public let status: StatusValues?
        /// TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012).
        public let targetId: String?
        /// The entity type for which the assignment will be created.
        public let targetType: TargetType?

        public init(createdDate: Date? = nil, failureReason: String? = nil, permissionSetArn: String? = nil, principalId: String? = nil, principalType: PrincipalType? = nil, requestId: String? = nil, status: StatusValues? = nil, targetId: String? = nil, targetType: TargetType? = nil) {
            self.createdDate = createdDate
            self.failureReason = failureReason
            self.permissionSetArn = permissionSetArn
            self.principalId = principalId
            self.principalType = principalType
            self.requestId = requestId
            self.status = status
            self.targetId = targetId
            self.targetType = targetType
        }

        private enum CodingKeys: String, CodingKey {
            case createdDate = "CreatedDate"
            case failureReason = "FailureReason"
            case permissionSetArn = "PermissionSetArn"
            case principalId = "PrincipalId"
            case principalType = "PrincipalType"
            case requestId = "RequestId"
            case status = "Status"
            case targetId = "TargetId"
            case targetType = "TargetType"
        }
    }

    public struct AccountAssignmentOperationStatusMetadata: AWSDecodableShape {
        /// The date that the permission set was created.
        public let createdDate: Date?
        /// The identifier for tracking the request operation that is generated by the universally unique identifier (UUID) workflow.
        public let requestId: String?
        /// The status of the permission set provisioning process.
        public let status: StatusValues?

        public init(createdDate: Date? = nil, requestId: String? = nil, status: StatusValues? = nil) {
            self.createdDate = createdDate
            self.requestId = requestId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case createdDate = "CreatedDate"
            case requestId = "RequestId"
            case status = "Status"
        }
    }

    public struct AttachManagedPolicyToPermissionSetRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The IAM managed policy ARN to be attached to a permission set.
        public let managedPolicyArn: String
        /// The ARN of the PermissionSet that the managed policy should be attached to.
        public let permissionSetArn: String

        public init(instanceArn: String, managedPolicyArn: String, permissionSetArn: String) {
            self.instanceArn = instanceArn
            self.managedPolicyArn = managedPolicyArn
            self.permissionSetArn = permissionSetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.managedPolicyArn, name: "managedPolicyArn", parent: name, max: 2048)
            try self.validate(self.managedPolicyArn, name: "managedPolicyArn", parent: name, min: 20)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case managedPolicyArn = "ManagedPolicyArn"
            case permissionSetArn = "PermissionSetArn"
        }
    }

    public struct AttachManagedPolicyToPermissionSetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AttachedManagedPolicy: AWSDecodableShape {
        /// The ARN of the IAM managed policy. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let arn: String?
        /// The name of the IAM managed policy.
        public let name: String?

        public init(arn: String? = nil, name: String? = nil) {
            self.arn = arn
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case name = "Name"
        }
    }

    public struct CreateAccountAssignmentRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The ARN of the permission set that the admin wants to grant the principal access to.
        public let permissionSetArn: String
        /// An identifier for an object in AWS SSO, such as a user or group. PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in AWS SSO, see the AWS SSO Identity Store API Reference.
        public let principalId: String
        /// The entity type for which the assignment will be created.
        public let principalType: PrincipalType
        /// TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012).
        public let targetId: String
        /// The entity type for which the assignment will be created.
        public let targetType: TargetType

        public init(instanceArn: String, permissionSetArn: String, principalId: String, principalType: PrincipalType, targetId: String, targetType: TargetType) {
            self.instanceArn = instanceArn
            self.permissionSetArn = permissionSetArn
            self.principalId = principalId
            self.principalType = principalType
            self.targetId = targetId
            self.targetType = targetType
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
            try self.validate(self.principalId, name: "principalId", parent: name, max: 47)
            try self.validate(self.principalId, name: "principalId", parent: name, min: 1)
            try self.validate(self.principalId, name: "principalId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
            try self.validate(self.targetId, name: "targetId", parent: name, pattern: "\\d{12}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case permissionSetArn = "PermissionSetArn"
            case principalId = "PrincipalId"
            case principalType = "PrincipalType"
            case targetId = "TargetId"
            case targetType = "TargetType"
        }
    }

    public struct CreateAccountAssignmentResponse: AWSDecodableShape {
        /// The status object for the account assignment creation operation.
        public let accountAssignmentCreationStatus: AccountAssignmentOperationStatus?

        public init(accountAssignmentCreationStatus: AccountAssignmentOperationStatus? = nil) {
            self.accountAssignmentCreationStatus = accountAssignmentCreationStatus
        }

        private enum CodingKeys: String, CodingKey {
            case accountAssignmentCreationStatus = "AccountAssignmentCreationStatus"
        }
    }

    public struct CreateInstanceAccessControlAttributeConfigurationRequest: AWSEncodableShape {
        /// Specifies the AWS SSO identity store attributes to add to your ABAC configuration. When using an external identity provider as an identity source, you can pass attributes through the SAML assertion as an alternative to configuring attributes from the AWS SSO identity store. If a SAML assertion passes any of these attributes, AWS SSO will replace the attribute value with the value from the AWS SSO identity store.
        public let instanceAccessControlAttributeConfiguration: InstanceAccessControlAttributeConfiguration
        /// The ARN of the SSO instance under which the operation will be executed.
        public let instanceArn: String

        public init(instanceAccessControlAttributeConfiguration: InstanceAccessControlAttributeConfiguration, instanceArn: String) {
            self.instanceAccessControlAttributeConfiguration = instanceAccessControlAttributeConfiguration
            self.instanceArn = instanceArn
        }

        public func validate(name: String) throws {
            try self.instanceAccessControlAttributeConfiguration.validate(name: "\(name).instanceAccessControlAttributeConfiguration")
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceAccessControlAttributeConfiguration = "InstanceAccessControlAttributeConfiguration"
            case instanceArn = "InstanceArn"
        }
    }

    public struct CreateInstanceAccessControlAttributeConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CreatePermissionSetRequest: AWSEncodableShape {
        /// The description of the PermissionSet.
        public let description: String?
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The name of the PermissionSet.
        public let name: String
        /// Used to redirect users within the application during the federation authentication process.
        public let relayState: String?
        /// The length of time that the application user sessions are valid in the ISO-8601 standard.
        public let sessionDuration: String?
        /// The tags to attach to the new PermissionSet.
        public let tags: [Tag]?

        public init(description: String? = nil, instanceArn: String, name: String, relayState: String? = nil, sessionDuration: String? = nil, tags: [Tag]? = nil) {
            self.description = description
            self.instanceArn = instanceArn
            self.name = name
            self.relayState = relayState
            self.sessionDuration = sessionDuration
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 700)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "[\\p{L}\\p{M}\\p{Z}\\p{S}\\p{N}\\p{P}]*")
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.name, name: "name", parent: name, max: 32)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[\\w+=,.@-]+")
            try self.validate(self.relayState, name: "relayState", parent: name, max: 240)
            try self.validate(self.relayState, name: "relayState", parent: name, min: 1)
            try self.validate(self.relayState, name: "relayState", parent: name, pattern: "[a-zA-Z0-9&$@#\\\\\\/%?=~\\-_'\"|!:,.;*+\\[\\]\\ \\(\\)\\{\\}]+")
            try self.validate(self.sessionDuration, name: "sessionDuration", parent: name, max: 100)
            try self.validate(self.sessionDuration, name: "sessionDuration", parent: name, min: 1)
            try self.validate(self.sessionDuration, name: "sessionDuration", parent: name, pattern: "^(-?)P(?=\\d|T\\d)(?:(\\d+)Y)?(?:(\\d+)M)?(?:(\\d+)([DW]))?(?:T(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+(?:\\.\\d+)?)S)?)?$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case instanceArn = "InstanceArn"
            case name = "Name"
            case relayState = "RelayState"
            case sessionDuration = "SessionDuration"
            case tags = "Tags"
        }
    }

    public struct CreatePermissionSetResponse: AWSDecodableShape {
        /// Defines the level of access on an AWS account.
        public let permissionSet: PermissionSet?

        public init(permissionSet: PermissionSet? = nil) {
            self.permissionSet = permissionSet
        }

        private enum CodingKeys: String, CodingKey {
            case permissionSet = "PermissionSet"
        }
    }

    public struct DeleteAccountAssignmentRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The ARN of the permission set that will be used to remove access.
        public let permissionSetArn: String
        /// An identifier for an object in AWS SSO, such as a user or group. PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in AWS SSO, see the AWS SSO Identity Store API Reference.
        public let principalId: String
        /// The entity type for which the assignment will be deleted.
        public let principalType: PrincipalType
        /// TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012).
        public let targetId: String
        /// The entity type for which the assignment will be deleted.
        public let targetType: TargetType

        public init(instanceArn: String, permissionSetArn: String, principalId: String, principalType: PrincipalType, targetId: String, targetType: TargetType) {
            self.instanceArn = instanceArn
            self.permissionSetArn = permissionSetArn
            self.principalId = principalId
            self.principalType = principalType
            self.targetId = targetId
            self.targetType = targetType
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
            try self.validate(self.principalId, name: "principalId", parent: name, max: 47)
            try self.validate(self.principalId, name: "principalId", parent: name, min: 1)
            try self.validate(self.principalId, name: "principalId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
            try self.validate(self.targetId, name: "targetId", parent: name, pattern: "\\d{12}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case permissionSetArn = "PermissionSetArn"
            case principalId = "PrincipalId"
            case principalType = "PrincipalType"
            case targetId = "TargetId"
            case targetType = "TargetType"
        }
    }

    public struct DeleteAccountAssignmentResponse: AWSDecodableShape {
        /// The status object for the account assignment deletion operation.
        public let accountAssignmentDeletionStatus: AccountAssignmentOperationStatus?

        public init(accountAssignmentDeletionStatus: AccountAssignmentOperationStatus? = nil) {
            self.accountAssignmentDeletionStatus = accountAssignmentDeletionStatus
        }

        private enum CodingKeys: String, CodingKey {
            case accountAssignmentDeletionStatus = "AccountAssignmentDeletionStatus"
        }
    }

    public struct DeleteInlinePolicyFromPermissionSetRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The ARN of the permission set that will be used to remove access.
        public let permissionSetArn: String

        public init(instanceArn: String, permissionSetArn: String) {
            self.instanceArn = instanceArn
            self.permissionSetArn = permissionSetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case permissionSetArn = "PermissionSetArn"
        }
    }

    public struct DeleteInlinePolicyFromPermissionSetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteInstanceAccessControlAttributeConfigurationRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed.
        public let instanceArn: String

        public init(instanceArn: String) {
            self.instanceArn = instanceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
        }
    }

    public struct DeleteInstanceAccessControlAttributeConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeletePermissionSetRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The ARN of the permission set that should be deleted.
        public let permissionSetArn: String

        public init(instanceArn: String, permissionSetArn: String) {
            self.instanceArn = instanceArn
            self.permissionSetArn = permissionSetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case permissionSetArn = "PermissionSetArn"
        }
    }

    public struct DeletePermissionSetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeAccountAssignmentCreationStatusRequest: AWSEncodableShape {
        /// The identifier that is used to track the request operation progress.
        public let accountAssignmentCreationRequestId: String
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String

        public init(accountAssignmentCreationRequestId: String, instanceArn: String) {
            self.accountAssignmentCreationRequestId = accountAssignmentCreationRequestId
            self.instanceArn = instanceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.accountAssignmentCreationRequestId, name: "accountAssignmentCreationRequestId", parent: name, pattern: "\\b[0-9a-f]{8}\\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\\b[0-9a-f]{12}\\b")
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case accountAssignmentCreationRequestId = "AccountAssignmentCreationRequestId"
            case instanceArn = "InstanceArn"
        }
    }

    public struct DescribeAccountAssignmentCreationStatusResponse: AWSDecodableShape {
        /// The status object for the account assignment creation operation.
        public let accountAssignmentCreationStatus: AccountAssignmentOperationStatus?

        public init(accountAssignmentCreationStatus: AccountAssignmentOperationStatus? = nil) {
            self.accountAssignmentCreationStatus = accountAssignmentCreationStatus
        }

        private enum CodingKeys: String, CodingKey {
            case accountAssignmentCreationStatus = "AccountAssignmentCreationStatus"
        }
    }

    public struct DescribeAccountAssignmentDeletionStatusRequest: AWSEncodableShape {
        /// The identifier that is used to track the request operation progress.
        public let accountAssignmentDeletionRequestId: String
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String

        public init(accountAssignmentDeletionRequestId: String, instanceArn: String) {
            self.accountAssignmentDeletionRequestId = accountAssignmentDeletionRequestId
            self.instanceArn = instanceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.accountAssignmentDeletionRequestId, name: "accountAssignmentDeletionRequestId", parent: name, pattern: "\\b[0-9a-f]{8}\\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\\b[0-9a-f]{12}\\b")
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case accountAssignmentDeletionRequestId = "AccountAssignmentDeletionRequestId"
            case instanceArn = "InstanceArn"
        }
    }

    public struct DescribeAccountAssignmentDeletionStatusResponse: AWSDecodableShape {
        /// The status object for the account assignment deletion operation.
        public let accountAssignmentDeletionStatus: AccountAssignmentOperationStatus?

        public init(accountAssignmentDeletionStatus: AccountAssignmentOperationStatus? = nil) {
            self.accountAssignmentDeletionStatus = accountAssignmentDeletionStatus
        }

        private enum CodingKeys: String, CodingKey {
            case accountAssignmentDeletionStatus = "AccountAssignmentDeletionStatus"
        }
    }

    public struct DescribeInstanceAccessControlAttributeConfigurationRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed.
        public let instanceArn: String

        public init(instanceArn: String) {
            self.instanceArn = instanceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
        }
    }

    public struct DescribeInstanceAccessControlAttributeConfigurationResponse: AWSDecodableShape {
        /// Gets the list of AWS SSO identity store attributes added to your ABAC configuration.
        public let instanceAccessControlAttributeConfiguration: InstanceAccessControlAttributeConfiguration?
        /// The status of the attribute configuration process.
        public let status: InstanceAccessControlAttributeConfigurationStatus?
        /// Provides more details about the current status of the specified attribute.
        public let statusReason: String?

        public init(instanceAccessControlAttributeConfiguration: InstanceAccessControlAttributeConfiguration? = nil, status: InstanceAccessControlAttributeConfigurationStatus? = nil, statusReason: String? = nil) {
            self.instanceAccessControlAttributeConfiguration = instanceAccessControlAttributeConfiguration
            self.status = status
            self.statusReason = statusReason
        }

        private enum CodingKeys: String, CodingKey {
            case instanceAccessControlAttributeConfiguration = "InstanceAccessControlAttributeConfiguration"
            case status = "Status"
            case statusReason = "StatusReason"
        }
    }

    public struct DescribePermissionSetProvisioningStatusRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The identifier that is provided by the ProvisionPermissionSet call to retrieve the current status of the provisioning workflow.
        public let provisionPermissionSetRequestId: String

        public init(instanceArn: String, provisionPermissionSetRequestId: String) {
            self.instanceArn = instanceArn
            self.provisionPermissionSetRequestId = provisionPermissionSetRequestId
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.provisionPermissionSetRequestId, name: "provisionPermissionSetRequestId", parent: name, pattern: "\\b[0-9a-f]{8}\\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\\b[0-9a-f]{12}\\b")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case provisionPermissionSetRequestId = "ProvisionPermissionSetRequestId"
        }
    }

    public struct DescribePermissionSetProvisioningStatusResponse: AWSDecodableShape {
        /// The status object for the permission set provisioning operation.
        public let permissionSetProvisioningStatus: PermissionSetProvisioningStatus?

        public init(permissionSetProvisioningStatus: PermissionSetProvisioningStatus? = nil) {
            self.permissionSetProvisioningStatus = permissionSetProvisioningStatus
        }

        private enum CodingKeys: String, CodingKey {
            case permissionSetProvisioningStatus = "PermissionSetProvisioningStatus"
        }
    }

    public struct DescribePermissionSetRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The ARN of the permission set.
        public let permissionSetArn: String

        public init(instanceArn: String, permissionSetArn: String) {
            self.instanceArn = instanceArn
            self.permissionSetArn = permissionSetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case permissionSetArn = "PermissionSetArn"
        }
    }

    public struct DescribePermissionSetResponse: AWSDecodableShape {
        /// Describes the level of access on an AWS account.
        public let permissionSet: PermissionSet?

        public init(permissionSet: PermissionSet? = nil) {
            self.permissionSet = permissionSet
        }

        private enum CodingKeys: String, CodingKey {
            case permissionSet = "PermissionSet"
        }
    }

    public struct DetachManagedPolicyFromPermissionSetRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The IAM managed policy ARN to be attached to a permission set.
        public let managedPolicyArn: String
        /// The ARN of the PermissionSet from which the policy should be detached.
        public let permissionSetArn: String

        public init(instanceArn: String, managedPolicyArn: String, permissionSetArn: String) {
            self.instanceArn = instanceArn
            self.managedPolicyArn = managedPolicyArn
            self.permissionSetArn = permissionSetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.managedPolicyArn, name: "managedPolicyArn", parent: name, max: 2048)
            try self.validate(self.managedPolicyArn, name: "managedPolicyArn", parent: name, min: 20)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case managedPolicyArn = "ManagedPolicyArn"
            case permissionSetArn = "PermissionSetArn"
        }
    }

    public struct DetachManagedPolicyFromPermissionSetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct GetInlinePolicyForPermissionSetRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The ARN of the permission set.
        public let permissionSetArn: String

        public init(instanceArn: String, permissionSetArn: String) {
            self.instanceArn = instanceArn
            self.permissionSetArn = permissionSetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case permissionSetArn = "PermissionSetArn"
        }
    }

    public struct GetInlinePolicyForPermissionSetResponse: AWSDecodableShape {
        /// The IAM inline policy that is attached to the permission set.
        public let inlinePolicy: String?

        public init(inlinePolicy: String? = nil) {
            self.inlinePolicy = inlinePolicy
        }

        private enum CodingKeys: String, CodingKey {
            case inlinePolicy = "InlinePolicy"
        }
    }

    public struct InstanceAccessControlAttributeConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Lists the attributes that are configured for ABAC in the specified AWS SSO instance.
        public let accessControlAttributes: [AccessControlAttribute]

        public init(accessControlAttributes: [AccessControlAttribute]) {
            self.accessControlAttributes = accessControlAttributes
        }

        public func validate(name: String) throws {
            try self.accessControlAttributes.forEach {
                try $0.validate(name: "\(name).accessControlAttributes[]")
            }
            try self.validate(self.accessControlAttributes, name: "accessControlAttributes", parent: name, max: 50)
            try self.validate(self.accessControlAttributes, name: "accessControlAttributes", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case accessControlAttributes = "AccessControlAttributes"
        }
    }

    public struct InstanceMetadata: AWSDecodableShape {
        /// The identifier of the identity store that is connected to the SSO instance.
        public let identityStoreId: String?
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String?

        public init(identityStoreId: String? = nil, instanceArn: String? = nil) {
            self.identityStoreId = identityStoreId
            self.instanceArn = instanceArn
        }

        private enum CodingKeys: String, CodingKey {
            case identityStoreId = "IdentityStoreId"
            case instanceArn = "InstanceArn"
        }
    }

    public struct ListAccountAssignmentCreationStatusRequest: AWSEncodableShape {
        /// Filters results based on the passed attribute value.
        public let filter: OperationStatusFilter?
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The maximum number of results to display for the assignment.
        public let maxResults: Int?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?

        public init(filter: OperationStatusFilter? = nil, instanceArn: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.instanceArn = instanceArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/_]*")
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case instanceArn = "InstanceArn"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListAccountAssignmentCreationStatusResponse: AWSDecodableShape {
        /// The status object for the account assignment creation operation.
        public let accountAssignmentsCreationStatus: [AccountAssignmentOperationStatusMetadata]?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?

        public init(accountAssignmentsCreationStatus: [AccountAssignmentOperationStatusMetadata]? = nil, nextToken: String? = nil) {
            self.accountAssignmentsCreationStatus = accountAssignmentsCreationStatus
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case accountAssignmentsCreationStatus = "AccountAssignmentsCreationStatus"
            case nextToken = "NextToken"
        }
    }

    public struct ListAccountAssignmentDeletionStatusRequest: AWSEncodableShape {
        /// Filters results based on the passed attribute value.
        public let filter: OperationStatusFilter?
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The maximum number of results to display for the assignment.
        public let maxResults: Int?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?

        public init(filter: OperationStatusFilter? = nil, instanceArn: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.instanceArn = instanceArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/_]*")
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case instanceArn = "InstanceArn"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListAccountAssignmentDeletionStatusResponse: AWSDecodableShape {
        /// The status object for the account assignment deletion operation.
        public let accountAssignmentsDeletionStatus: [AccountAssignmentOperationStatusMetadata]?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?

        public init(accountAssignmentsDeletionStatus: [AccountAssignmentOperationStatusMetadata]? = nil, nextToken: String? = nil) {
            self.accountAssignmentsDeletionStatus = accountAssignmentsDeletionStatus
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case accountAssignmentsDeletionStatus = "AccountAssignmentsDeletionStatus"
            case nextToken = "NextToken"
        }
    }

    public struct ListAccountAssignmentsRequest: AWSEncodableShape {
        /// The identifier of the AWS account from which to list the assignments.
        public let accountId: String
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The maximum number of results to display for the assignment.
        public let maxResults: Int?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?
        /// The ARN of the permission set from which to list assignments.
        public let permissionSetArn: String

        public init(accountId: String, instanceArn: String, maxResults: Int? = nil, nextToken: String? = nil, permissionSetArn: String) {
            self.accountId = accountId
            self.instanceArn = instanceArn
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.permissionSetArn = permissionSetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.accountId, name: "accountId", parent: name, pattern: "\\d{12}")
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/_]*")
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "AccountId"
            case instanceArn = "InstanceArn"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case permissionSetArn = "PermissionSetArn"
        }
    }

    public struct ListAccountAssignmentsResponse: AWSDecodableShape {
        /// The list of assignments that match the input AWS account and permission set.
        public let accountAssignments: [AccountAssignment]?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?

        public init(accountAssignments: [AccountAssignment]? = nil, nextToken: String? = nil) {
            self.accountAssignments = accountAssignments
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case accountAssignments = "AccountAssignments"
            case nextToken = "NextToken"
        }
    }

    public struct ListAccountsForProvisionedPermissionSetRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The maximum number of results to display for the PermissionSet.
        public let maxResults: Int?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?
        /// The ARN of the PermissionSet from which the associated AWS accounts will be listed.
        public let permissionSetArn: String
        /// The permission set provisioning status for an AWS account.
        public let provisioningStatus: ProvisioningStatus?

        public init(instanceArn: String, maxResults: Int? = nil, nextToken: String? = nil, permissionSetArn: String, provisioningStatus: ProvisioningStatus? = nil) {
            self.instanceArn = instanceArn
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.permissionSetArn = permissionSetArn
            self.provisioningStatus = provisioningStatus
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/_]*")
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case permissionSetArn = "PermissionSetArn"
            case provisioningStatus = "ProvisioningStatus"
        }
    }

    public struct ListAccountsForProvisionedPermissionSetResponse: AWSDecodableShape {
        /// The list of AWS AccountIds.
        public let accountIds: [String]?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?

        public init(accountIds: [String]? = nil, nextToken: String? = nil) {
            self.accountIds = accountIds
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case accountIds = "AccountIds"
            case nextToken = "NextToken"
        }
    }

    public struct ListInstancesRequest: AWSEncodableShape {
        /// The maximum number of results to display for the instance.
        public let maxResults: Int?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/_]*")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListInstancesResponse: AWSDecodableShape {
        /// Lists the SSO instances that the caller has access to.
        public let instances: [InstanceMetadata]?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?

        public init(instances: [InstanceMetadata]? = nil, nextToken: String? = nil) {
            self.instances = instances
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case instances = "Instances"
            case nextToken = "NextToken"
        }
    }

    public struct ListManagedPoliciesInPermissionSetRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The maximum number of results to display for the PermissionSet.
        public let maxResults: Int?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?
        /// The ARN of the PermissionSet whose managed policies will be listed.
        public let permissionSetArn: String

        public init(instanceArn: String, maxResults: Int? = nil, nextToken: String? = nil, permissionSetArn: String) {
            self.instanceArn = instanceArn
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.permissionSetArn = permissionSetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/_]*")
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case permissionSetArn = "PermissionSetArn"
        }
    }

    public struct ListManagedPoliciesInPermissionSetResponse: AWSDecodableShape {
        /// The array of the AttachedManagedPolicy data type object.
        public let attachedManagedPolicies: [AttachedManagedPolicy]?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?

        public init(attachedManagedPolicies: [AttachedManagedPolicy]? = nil, nextToken: String? = nil) {
            self.attachedManagedPolicies = attachedManagedPolicies
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attachedManagedPolicies = "AttachedManagedPolicies"
            case nextToken = "NextToken"
        }
    }

    public struct ListPermissionSetProvisioningStatusRequest: AWSEncodableShape {
        /// Filters results based on the passed attribute value.
        public let filter: OperationStatusFilter?
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The maximum number of results to display for the assignment.
        public let maxResults: Int?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?

        public init(filter: OperationStatusFilter? = nil, instanceArn: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.instanceArn = instanceArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/_]*")
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case instanceArn = "InstanceArn"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListPermissionSetProvisioningStatusResponse: AWSDecodableShape {
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?
        /// The status object for the permission set provisioning operation.
        public let permissionSetsProvisioningStatus: [PermissionSetProvisioningStatusMetadata]?

        public init(nextToken: String? = nil, permissionSetsProvisioningStatus: [PermissionSetProvisioningStatusMetadata]? = nil) {
            self.nextToken = nextToken
            self.permissionSetsProvisioningStatus = permissionSetsProvisioningStatus
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case permissionSetsProvisioningStatus = "PermissionSetsProvisioningStatus"
        }
    }

    public struct ListPermissionSetsProvisionedToAccountRequest: AWSEncodableShape {
        /// The identifier of the AWS account from which to list the assignments.
        public let accountId: String
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The maximum number of results to display for the assignment.
        public let maxResults: Int?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?
        /// The status object for the permission set provisioning operation.
        public let provisioningStatus: ProvisioningStatus?

        public init(accountId: String, instanceArn: String, maxResults: Int? = nil, nextToken: String? = nil, provisioningStatus: ProvisioningStatus? = nil) {
            self.accountId = accountId
            self.instanceArn = instanceArn
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.provisioningStatus = provisioningStatus
        }

        public func validate(name: String) throws {
            try self.validate(self.accountId, name: "accountId", parent: name, pattern: "\\d{12}")
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/_]*")
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "AccountId"
            case instanceArn = "InstanceArn"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case provisioningStatus = "ProvisioningStatus"
        }
    }

    public struct ListPermissionSetsProvisionedToAccountResponse: AWSDecodableShape {
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?
        /// Defines the level of access that an AWS account has.
        public let permissionSets: [String]?

        public init(nextToken: String? = nil, permissionSets: [String]? = nil) {
            self.nextToken = nextToken
            self.permissionSets = permissionSets
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case permissionSets = "PermissionSets"
        }
    }

    public struct ListPermissionSetsRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The maximum number of results to display for the assignment.
        public let maxResults: Int?
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?

        public init(instanceArn: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.instanceArn = instanceArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/_]*")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListPermissionSetsResponse: AWSDecodableShape {
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?
        /// Defines the level of access on an AWS account.
        public let permissionSets: [String]?

        public init(nextToken: String? = nil, permissionSets: [String]? = nil) {
            self.nextToken = nextToken
            self.permissionSets = permissionSets
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case permissionSets = "PermissionSets"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?
        /// The ARN of the resource with the tags to be listed.
        public let resourceArn: String

        public init(instanceArn: String, nextToken: String? = nil, resourceArn: String) {
            self.instanceArn = instanceArn
            self.nextToken = nextToken
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/_]*")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 10)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:aws:sso:([a-zA-Z0-9-]+)?:(\\d{12})?:[a-zA-Z0-9-]+/[a-zA-Z0-9-/.]+")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case nextToken = "NextToken"
            case resourceArn = "ResourceArn"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.
        public let nextToken: String?
        /// A set of key-value pairs that are used to manage the resource.
        public let tags: [Tag]?

        public init(nextToken: String? = nil, tags: [Tag]? = nil) {
            self.nextToken = nextToken
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case tags = "Tags"
        }
    }

    public struct OperationStatusFilter: AWSEncodableShape {
        /// Filters the list operations result based on the status attribute.
        public let status: StatusValues?

        public init(status: StatusValues? = nil) {
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case status = "Status"
        }
    }

    public struct PermissionSet: AWSDecodableShape {
        /// The date that the permission set was created.
        public let createdDate: Date?
        /// The description of the PermissionSet.
        public let description: String?
        /// The name of the permission set.
        public let name: String?
        /// The ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let permissionSetArn: String?
        /// Used to redirect users within the application during the federation authentication process.
        public let relayState: String?
        /// The length of time that the application user sessions are valid for in the ISO-8601 standard.
        public let sessionDuration: String?

        public init(createdDate: Date? = nil, description: String? = nil, name: String? = nil, permissionSetArn: String? = nil, relayState: String? = nil, sessionDuration: String? = nil) {
            self.createdDate = createdDate
            self.description = description
            self.name = name
            self.permissionSetArn = permissionSetArn
            self.relayState = relayState
            self.sessionDuration = sessionDuration
        }

        private enum CodingKeys: String, CodingKey {
            case createdDate = "CreatedDate"
            case description = "Description"
            case name = "Name"
            case permissionSetArn = "PermissionSetArn"
            case relayState = "RelayState"
            case sessionDuration = "SessionDuration"
        }
    }

    public struct PermissionSetProvisioningStatus: AWSDecodableShape {
        /// The identifier of the AWS account from which to list the assignments.
        public let accountId: String?
        /// The date that the permission set was created.
        public let createdDate: Date?
        /// The message that contains an error or exception in case of an operation failure.
        public let failureReason: String?
        /// The ARN of the permission set that is being provisioned. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let permissionSetArn: String?
        /// The identifier for tracking the request operation that is generated by the universally unique identifier (UUID) workflow.
        public let requestId: String?
        /// The status of the permission set provisioning process.
        public let status: StatusValues?

        public init(accountId: String? = nil, createdDate: Date? = nil, failureReason: String? = nil, permissionSetArn: String? = nil, requestId: String? = nil, status: StatusValues? = nil) {
            self.accountId = accountId
            self.createdDate = createdDate
            self.failureReason = failureReason
            self.permissionSetArn = permissionSetArn
            self.requestId = requestId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "AccountId"
            case createdDate = "CreatedDate"
            case failureReason = "FailureReason"
            case permissionSetArn = "PermissionSetArn"
            case requestId = "RequestId"
            case status = "Status"
        }
    }

    public struct PermissionSetProvisioningStatusMetadata: AWSDecodableShape {
        /// The date that the permission set was created.
        public let createdDate: Date?
        /// The identifier for tracking the request operation that is generated by the universally unique identifier (UUID) workflow.
        public let requestId: String?
        /// The status of the permission set provisioning process.
        public let status: StatusValues?

        public init(createdDate: Date? = nil, requestId: String? = nil, status: StatusValues? = nil) {
            self.createdDate = createdDate
            self.requestId = requestId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case createdDate = "CreatedDate"
            case requestId = "RequestId"
            case status = "Status"
        }
    }

    public struct ProvisionPermissionSetRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The ARN of the permission set.
        public let permissionSetArn: String
        /// TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012).
        public let targetId: String?
        /// The entity type for which the assignment will be created.
        public let targetType: ProvisionTargetType

        public init(instanceArn: String, permissionSetArn: String, targetId: String? = nil, targetType: ProvisionTargetType) {
            self.instanceArn = instanceArn
            self.permissionSetArn = permissionSetArn
            self.targetId = targetId
            self.targetType = targetType
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
            try self.validate(self.targetId, name: "targetId", parent: name, pattern: "\\d{12}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case permissionSetArn = "PermissionSetArn"
            case targetId = "TargetId"
            case targetType = "TargetType"
        }
    }

    public struct ProvisionPermissionSetResponse: AWSDecodableShape {
        /// The status object for the permission set provisioning operation.
        public let permissionSetProvisioningStatus: PermissionSetProvisioningStatus?

        public init(permissionSetProvisioningStatus: PermissionSetProvisioningStatus? = nil) {
            self.permissionSetProvisioningStatus = permissionSetProvisioningStatus
        }

        private enum CodingKeys: String, CodingKey {
            case permissionSetProvisioningStatus = "PermissionSetProvisioningStatus"
        }
    }

    public struct PutInlinePolicyToPermissionSetRequest: AWSEncodableShape {
        /// The IAM inline policy to attach to a PermissionSet.
        public let inlinePolicy: String
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The ARN of the permission set.
        public let permissionSetArn: String

        public init(inlinePolicy: String, instanceArn: String, permissionSetArn: String) {
            self.inlinePolicy = inlinePolicy
            self.instanceArn = instanceArn
            self.permissionSetArn = permissionSetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.inlinePolicy, name: "inlinePolicy", parent: name, max: 10240)
            try self.validate(self.inlinePolicy, name: "inlinePolicy", parent: name, min: 1)
            try self.validate(self.inlinePolicy, name: "inlinePolicy", parent: name, pattern: "[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+")
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case inlinePolicy = "InlinePolicy"
            case instanceArn = "InstanceArn"
            case permissionSetArn = "PermissionSetArn"
        }
    }

    public struct PutInlinePolicyToPermissionSetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key for the tag.
        public let key: String?
        /// The value of the tag.
        public let value: String?

        public init(key: String? = nil, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, min: 0)
            try self.validate(self.value, name: "value", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The ARN of the resource with the tags to be listed.
        public let resourceArn: String
        /// A set of key-value pairs that are used to manage the resource.
        public let tags: [Tag]

        public init(instanceArn: String, resourceArn: String, tags: [Tag]) {
            self.instanceArn = instanceArn
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 10)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:aws:sso:([a-zA-Z0-9-]+)?:(\\d{12})?:[a-zA-Z0-9-]+/[a-zA-Z0-9-/.]+")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The ARN of the resource with the tags to be listed.
        public let resourceArn: String
        /// The keys of tags that are attached to the resource.
        public let tagKeys: [String]

        public init(instanceArn: String, resourceArn: String, tagKeys: [String]) {
            self.instanceArn = instanceArn
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 10)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:aws:sso:([a-zA-Z0-9-]+)?:(\\d{12})?:[a-zA-Z0-9-]+/[a-zA-Z0-9-/.]+")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case instanceArn = "InstanceArn"
            case resourceArn = "ResourceArn"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateInstanceAccessControlAttributeConfigurationRequest: AWSEncodableShape {
        /// Updates the attributes for your ABAC configuration.
        public let instanceAccessControlAttributeConfiguration: InstanceAccessControlAttributeConfiguration
        /// The ARN of the SSO instance under which the operation will be executed.
        public let instanceArn: String

        public init(instanceAccessControlAttributeConfiguration: InstanceAccessControlAttributeConfiguration, instanceArn: String) {
            self.instanceAccessControlAttributeConfiguration = instanceAccessControlAttributeConfiguration
            self.instanceArn = instanceArn
        }

        public func validate(name: String) throws {
            try self.instanceAccessControlAttributeConfiguration.validate(name: "\(name).instanceAccessControlAttributeConfiguration")
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
        }

        private enum CodingKeys: String, CodingKey {
            case instanceAccessControlAttributeConfiguration = "InstanceAccessControlAttributeConfiguration"
            case instanceArn = "InstanceArn"
        }
    }

    public struct UpdateInstanceAccessControlAttributeConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdatePermissionSetRequest: AWSEncodableShape {
        /// The description of the PermissionSet.
        public let description: String?
        /// The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
        public let instanceArn: String
        /// The ARN of the permission set.
        public let permissionSetArn: String
        /// Used to redirect users within the application during the federation authentication process.
        public let relayState: String?
        /// The length of time that the application user sessions are valid for in the ISO-8601 standard.
        public let sessionDuration: String?

        public init(description: String? = nil, instanceArn: String, permissionSetArn: String, relayState: String? = nil, sessionDuration: String? = nil) {
            self.description = description
            self.instanceArn = instanceArn
            self.permissionSetArn = permissionSetArn
            self.relayState = relayState
            self.sessionDuration = sessionDuration
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 700)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "[\\p{L}\\p{M}\\p{Z}\\p{S}\\p{N}\\p{P}]*")
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, max: 1224)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, min: 10)
            try self.validate(self.instanceArn, name: "instanceArn", parent: name, pattern: "arn:aws:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}")
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, max: 1224)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, min: 10)
            try self.validate(self.permissionSetArn, name: "permissionSetArn", parent: name, pattern: "arn:aws:sso:::permissionSet/(sso)?ins-[a-zA-Z0-9-.]{16}/ps-[a-zA-Z0-9-./]{16}")
            try self.validate(self.relayState, name: "relayState", parent: name, max: 240)
            try self.validate(self.relayState, name: "relayState", parent: name, min: 1)
            try self.validate(self.relayState, name: "relayState", parent: name, pattern: "[a-zA-Z0-9&$@#\\\\\\/%?=~\\-_'\"|!:,.;*+\\[\\]\\ \\(\\)\\{\\}]+")
            try self.validate(self.sessionDuration, name: "sessionDuration", parent: name, max: 100)
            try self.validate(self.sessionDuration, name: "sessionDuration", parent: name, min: 1)
            try self.validate(self.sessionDuration, name: "sessionDuration", parent: name, pattern: "^(-?)P(?=\\d|T\\d)(?:(\\d+)Y)?(?:(\\d+)M)?(?:(\\d+)([DW]))?(?:T(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+(?:\\.\\d+)?)S)?)?$")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case instanceArn = "InstanceArn"
            case permissionSetArn = "PermissionSetArn"
            case relayState = "RelayState"
            case sessionDuration = "SessionDuration"
        }
    }

    public struct UpdatePermissionSetResponse: AWSDecodableShape {
        public init() {}
    }
}
